var mongoose = require('mongoose');
var mongoosePaginate = require('mongoose-paginate');
var materializedPlugin=require("mongoose-materialized");
var schema = new mongoose.Schema({ /* schema definition */
    user:String,
    newsid: String,
    content: String,
    time: Date,
    like: Number,
    unlike: Number,
    isauthor:Boolean
});
schema.plugin(materializedPlugin);
schema.plugin(mongoosePaginate);

var comment = mongoose.model('comment', schema); // Model.paginate()
module.exports = comment;